package com.xiongkw.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropUtils {
	
	public static Properties load(Class<?> clazz,String fileName){
		Properties prop = new Properties();
	    try (InputStream input = clazz.getClassLoader().getResourceAsStream(fileName)) {
	        prop.load(input);
	        return prop;
	    } catch (IOException e) {
			throw new RuntimeException("cannot find file : "+fileName,e);
		}
	}
	
}